package cloud.xiangyixiang.www.spring.boot.java.basics.utils;

import cloud.xiangyixiang.www.spring.boot.java.basics.annotations.Check;
import cloud.xiangyixiang.www.spring.boot.java.basics.annotations.Hero;
import cloud.xiangyixiang.www.spring.boot.java.basics.annotations.Perform;
import cloud.xiangyixiang.www.spring.boot.java.basics.annotations.TestAnnotation;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

/**
 * <p>
 * 属性上添加注解
 * </p>
 *
 * @author weixin
 * @date 2023/9/7 15:57
 */
@TestAnnotation(msg="hello")
public class AttributeAnnotation {

    @Check(value="hi")
    int a;

    @Perform
    public void testMethod(){}

    @SuppressWarnings("deprecation")
    public void test1(){
        Hero hero = new Hero();
        hero.say();
        hero.speak();
    }

}
